home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / utility / sml-mode-3.3b / README next >
Encoding:
Text File  |  1997-08-18  |  5.2 KB  |  154 lines  |  [TEXT/R*ch]

  1. SML-MODE (3.3b) -- Major Emacs mode for editing Standard ML.
  2.  
  3.   3.3(beta) because i really am looking at the indentation algorithm,
  4.   but the new features mentioned below are stable -- modulo bugs.
  5.  
  6. Files:
  7.  
  8.   sml-mode.el     (SML mode elisp code)
  9.   sml-proc.el     (ML interaction code, defaults to SML/NJ(0.93))
  10.   sml-hilite.el   (hilit19 functions)
  11.   sml-font.el     (font-lock functions)
  12.   sml-menus.el    (Simple menus)
  13.  
  14.   sml-poly-ml.el  (Additional library code to run Poly/ML)
  15.   sml-mosml.el    (Additional library code to run Moscow ML)
  16.  
  17.   sml-mode.info   (Softcopy manual -- Info for (X)Emacs19)
  18.   sml-site.el     (Simple, system-wide installation)
  19.  
  20. Extras:
  21.  
  22.   sml-mode.dvi    (Hardcopy manual)
  23.  
  24. Warning:
  25.  
  26.   Tried and sort of tested on GNU Emacs 19.3{3,4} and XEmacs 19.14.
  27.  
  28.   XEmacs 19.11 is known to hang on sending regions to the interaction
  29.   buffer -- so leave the variable SML-TEMP-THRESHOLD = 0.
  30.  
  31. System Installation Guide:
  32.  
  33.   If you're installing this for others in the Emacs hierarchy, either
  34.  
  35.     go to the site-lisp directory and unpack the tar file there, 
  36.  
  37.     or create a subdirectory, say site-lisp/sml-mode, and copy at
  38.     least the sml*.el files into it.
  39.  
  40.   In either case move or copy the file sml-site.el into the site-lisp
  41.   directory itself (or some other place that's on the user's default
  42.   load-path) and read and edit this file. All that's really needed is
  43.   to ensure that Emacs can find the sml*.el files and the .info file.
  44.  
  45.   Tell your eager users to
  46.  
  47.   (requite 'sml-site) 
  48.  
  49.   in their .emacses. Point them to the help file. At your option, byte
  50.   compile the sml*.el files (and sml-site.el too, if you like).
  51.  
  52. Private Installation Guide:
  53.  
  54.   If you are having to install his in your home directory, say, create
  55.   a directory like "/home/xxx/lib/emacs/sml-mode", if your login name
  56.   is xxx, and copy the sml-*.el files to there. Then put:
  57.   
  58.   (setq load-path (cons "/home/xxx/lib/emacs/sml-mode" load-path))
  59.   (autoload 'sml-mode "sml-mode" "Major mode for editing ML programs." t)
  60.  
  61.   in your .emacs file. Add:
  62.  
  63.   (setq auto-mode-alist
  64.         (append '(("\\.sml$" . sml-mode) 
  65.                   ("\\.sig$" . sml-mode) 
  66.                   ("\\.ML$"  . sml-mode)) auto-mode-alist))
  67.  
  68.   to your .emacs so that whenever you visit a file with one of these
  69.   extensions you will automatically be placed in sml-mode.
  70.  
  71.   Put the info file (sml-mode.info) somewhere convenient like
  72.   "/home/xxx/lib/emacs/sml-mode/sml-mode.info", and add
  73.  
  74.   (setq sml-mode-info "/home/xxx/lib/emacs/sml-mode/sml-mode.info")
  75.  
  76.   again to your .emacs -- this gives access to on-line help. This help
  77.   file gives lots of tips about configuring SML mode to suit your
  78.   preferences: C-c C-i will get you there from SML mode.
  79.  
  80.   If you want SML mode to speak to Moscow ML or Poly/ML instead of
  81.   SML/NJ, just add something like this to your .emacs:
  82.  
  83.   (defun my-mosml-setup () "Configure inferior SML mode for Moscow ML"
  84.     (load-library "sml-mosml"))
  85.   (add-hook 'inferior-sml-load-hook 'my-mosml-setup)
  86.  
  87.   so that when you M-x sml you'll get mosml instead.
  88.  
  89. New in SML mode Version 3.3 (feedback welcomed on this):
  90.  
  91.   1
  92.  
  93.   implemented some multi-frame handling capabilities, specifically so 
  94.   sml runs in a dedicated window. this is more complex than it needs to
  95.   be because of XEmacs...
  96.  
  97.   the variable SML-DEDICATED-FRAME defaults to t if running under a
  98.   window system; set it to nil in SML-LOAD-HOOK if you want the old
  99.   split window behaviour back.
  100.  
  101.   2
  102.  
  103.   debugged SML-NEXT-ERROR a bit, and improved it to echo the error
  104.   message in the minibuffer (if possible) and highlight the region in
  105.   which the error was found (if a suitable character range was given).
  106.  
  107.   the variable SML-ERROR-OVERLAY controls whether or not to highlight
  108.   (default is yes); set this to nil in SML-MODE-HOOK to switch this
  109.   off. 
  110.  
  111.   SML-NEXT-ERROR won't always raise the inferior ML buffer's frame; it
  112.   only does so if there's no window already showing the buffer, or if
  113.   there's an error message it can't understand. i think!
  114.  
  115.   3
  116.  
  117.   support for Moscow ML -- see sml-mosml.el.
  118.  
  119.   4
  120.  
  121.   forms (aka, templates or macros) insertion semantics have changed
  122.   because there were bugs. maybe there still are, but anyway: by
  123.   default C-c C-m inserts the macro at point, C-u C-c C-m will do a
  124.   newline-and-indent before inserting the macro.
  125.  
  126.   abstractions are history, and you can play with extending the
  127.   collection of builtin macros to your heart's content. lookup the
  128.   function SML-ADDTO-FORMS-ALIST, and the variable SML-FORMS-ALIST.
  129.  
  130.   5
  131.  
  132.   drag-and-droppishness, without the drop: SML-DRAG-MOUSE is bound to
  133.   M-S-down-mouse-1; if you drag the mouse over a region it will be
  134.   magically sucked into the ML buffer (like C-c C-r, only you don't
  135.   have to C-@ first). this might be flakey as it heavily depends on
  136.   the underlying mouse-drag/track-mouse semantics of the various
  137.   Emacses out there. can't do much about that, sorry.
  138.  
  139.   6
  140.  
  141.   anything else i've forgotten already!
  142.  
  143. To Do:
  144.  
  145.   0
  146.  
  147.   indentation is hopeless for sequential code (semicolons). this needs
  148.   attention; indeed all the indentation code does. Ian Zimmerman's very
  149.   excellent (looking) indentation code for caml-mode may point the way
  150.   forward. or we all go over to programming in Lisp instead of ML...
  151.  
  152. Matthew Morley <mjm@scs.leeds.ac.uk>
  153. 05/97
  154.